package com.amgl.amupush.base;

import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import com.amgl.amupush.utils.AmuUtils;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by amglh on 2016/8/5.
 */
public class BaseActivity extends AppCompatActivity {
    @Override
    protected void onResume() {
        super.onResume();
        JPushInterface.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        JPushInterface.onPause(this);
    }

    protected void showToast(String message, @AmuUtils.Duration int length) {
        AmuUtils.showToast(this, message, length);
    }

    /**
     * 显示提示
     *
     * @param message
     */
    protected void showToast(String message) {
        showToast(message, Toast.LENGTH_SHORT);
    }
}
